
/**
 * 判断是否在数组中
 * @param {mixed} search
 * @param {array} array
 * @param {bool} flag
 * @returns
 */
export function in_array(search, array, flag = false) {
    for (const i in array) {
        if (flag === true && array[i] === search) {
            return true
        } else if (array[i] == search) {
            return true
        }
    }
    return false
}

